YaCa behaves just like a ‘real’ calculator, click the buttons or use the number keys on your keyboard. Try out these features:
• There are 10 memories under the STO and RCL buttons, they are saved when you quit.
• There is a log window, somewhat like a printing calculator's. Open it from the File menu, clear it from the Edit menu, save it as a SimpleText document to print, edit or whatever. The log window also displays error messages (try getting the log of zero).
• Colour schemes can be selected in the preferences dialog (opened from the Edit menu).
• The Conversion menu provides conversions between many common units (conversions shown in italics are approximate).
• You can Undo/Redo the last action (from the Edit menu or use command Z).
• Numbers can be Copied and Pasted as text into another application.
1.2 - SUPPORT
Information
• Read the reference notes below.
• Check the web site, you can copy its address straight out of the About box.
• If it's still not clear, email the author.
Updates
• Check the web site from time to time.
• Also check <http://www.versiontracker.com/>
Addresses
• web site <http://www.cobalt.u-net.com/>
• email <mailto://yaca@cobalt.u-net.com>
or <mailto://cobalt@kagi.com>
1.3 - REGISTERING
YaCa 2.0 is shareware, but even when unregistered YaCa is fully functional so you can try it out to see if it's what you need. Unregistered copies flash an 'Unregistered' message in the drag bar when they start up (for about 1/5 of a second).
If you find the program useful you should register it, which is very easy. Use the Register application included with YaCa. The ‘Registering’ document explains how to do it.
(NEW - You can now register on-line, check the web site for details).
Registration costs $10 for a single user, $100 for any number of users at single site or $500 worldwide. Registration is forever, it includes all future upgrades of the program.
Your registration will help with developing new and better software.
Note: If YaCa's preferences file is damaged or lost it will forget that it has been registered, just enter your name and code into the About dialog again.
YaCa was compiled using MPW, therefore some parts may be copyright Apple.
YaCa cannot be sold, either by itself or in combination with any other product, without the express written permission of the author.
All distributions of YaCa must be distributions of the full package including documentation.
Limited warranty and limitation of remedies
The program and any support from the author, are provided “as is” and without warranty, express and implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose. In no event will the author be liable for any damages, including lost profits, lost savings, or other incidental or consequential damages, even if the author is advised of the possibility of such damages, or for any claim by you or any third party.
REFERENCE
_____________________________
2.1 - BUTTONS and the KEYBOARD
The calculator can be driven by clicking the buttons or from the keyboard.
Hold down the shift key to get the alternative function (the one shown above the button).
Key Equivalent Button
—-- ————————---------
e exponent
enter =
return =
delete clear
clear clear
s sin
c cos
t tan
l log (log base 10)
n ln (log base e)
b lg2 (log base 2)
r 1/x
q sqr root
f change sign
p power
The clicking noises can be switched on and off in the preferences dialog.
2.2 - NUMBERS
General/Exponential
Use the Numbers menu to choose how numbers are displayed. General shows numbers in a floating format, if the numbers get too big it switches to exponential. Choose Exponential to show numbers in exponential format at all times.
In either mode an exponent can be entered using the [exp] button or the ‘e’ key. Exponents are always integers.
2e2 means 2 times ten to the 2 which is 200
2e-3 means 0.002
Results that are too big are displayed as INF (infinity).
International Formats
The calculator is aware of international number formats. For example, on a British or US mac you get ‘ . ’ as a decimal point and on a French mac you get ‘ , ’. Copy and paste are also affected by international number formats.
The calculator is aware of the thousands separator, but will reject it at the keyboard. It is only significant when pasting a number.
2.3 - OPERATIONS
Precedence
Operations are not performed left to right but according to their precedence: raising to a power is performed first, multiplication and division are performed next, addition and subtraction are performed last. So expressions are evaluated as they are conventionally written. For example;
1 + 2 * 3 means 1 + (2 * 3)
the result is 7, not 9.
You can use brackets to change the order of evaluation, they can be nested 9 deep.
10 * 2 + 5 = 25
but
10 * (2 + 5) = 70
+ and - can be applied monadically like this:
2 + -1 = 1
2.4 - FUNCTIONS
Precedence
Most functions are obvious and work like other calculators, in other words they are NOT used as you would write them down. They have the highest precedence and are evaluated immediately.
For example (where √ means the square root button);
7 + 9 √ =
means 7 + ‘square root of’ 9 =
evaluates 7 + 3 = 10
Similarly, to find 10 sin(30˚)
enter 30 sin * 10 =
or 10 * ( 30 sin ) =
Angles
Trigonometric functions interpret angles as radians or degrees depending on the setting of the Numbers menu. An angle can be converted between radians and degrees at any time using the Convert menu.
Ranges
Some functions have limited ranges
acos(x) result is in [0...pi]
asin(x) result is in [-pi/2...pi/2]
atan(x) result is in [-pi/2...pi/2]
log(x) x must be greater than 0
ln(x) x must be greater than 0
lg2(x) x must be greater than 0
root(x) x must be positive
1/x x cannot be zero
* x! x must be less than 499
*Factorials
Factorial is an integer function, but if you ask for the factorial of a real number, the calculator will (1) make it positive and (2) truncate it, so:
2.3! is evaluated as 2!
-6.8! is evaluated as 6!
2.5 - PERCENTAGES
The percentage function is a variation on ‘=’, it evaluates x = y*(x/100) first. In practice it’s used like this:
50 + 10 %= 55
50 - 10 %= 45
50 * 10 %= 250
Precedence of operators still applies here:
20 + 50 * 10 %=
20 + (50 * 5) =
270
Finally, this is unusual but possible:
2 ^ 400 %= is 2 ^ 8 = 256
2.6 - CLEAR
Plain clear [C] clears x, so if you make a mistake you can correct it;
100 + 200 [C] 300 =
evaluates as
100 + 300 =
Shift clear [AC] means all clear, it clears everything except the memory.
If you have pressed the wrong button and want to clear a single digit you should use Undo…
2.7 - UNDO/REDO
Undo undoes the last action performed. It completely reverses the action, restoring the calculator to the state it was in before the action. Once undone, an action can be re-done by selecting Redo.
The following actions are undoable:
Digits, Constants
Operators and Functions
Clear (but not All Clear)
Equals
Memory, Push and Pop
Brackets
Conversions
Paste
The following cannot be undone:
Copy and Cut
All Clear
Clearing the log
The following are not affected by undo, and do not affect it:
Altering preferences.
Altering angle or display modes in the Numbers menu.
Undo/Redo can be selected from the keyboard with command Z.
2.8 - MEMORY
Store/Recall
There are 10 memories, M and k1 to k9. They are identical, but there are some extra things you can do with them independently. The memories are accessed using popup menus under the STO and RCL buttons. STO stores x in the memory. RCL recalls x from the memory.
The memories are saved when you quit (into the preferences file).
Accumulating M
There are some extra ‘accumulator’ functions that apply to the M memory:
m+x add x to the memory
m-x subtract x from the memory
m*x multiply the memory by x
m/x divide the memory by x
Push and Pop k
The k memories can treated as a stack. Pushing and popping a stack is common in programming but may be a strange idea elsewhere.
Imagine the k memories as a continuous block with k1 at the top and k9 at the bottom.
Push makes the content of each k memory move downwards: k1 is moved to k2, k2 is moved to k3, and so on, with k9 falling off the bottom. The value of x is then copied onto the top at k1.
Pop does the reverse. k1 is copied to x, then all the values move upwards, with k9 at the bottom being filled with 0.
The easiest way to get the hang of it is to experiment; put a value in x, press Push and then have a look at the memories. Push a few more values to see the stack moving downwards, then try popping. It is important to remember that every time you push, k9 falls off the bottom and is lost forever. Remember too that memory M is not affected by pushing or popping.
2.9 - COPY and PASTE
Cut, Copy and Clear are enabled whenever the displayed number (x) is not 0. Paste is enabled whenever there is text to paste that is a number.
International formatting is applied to the clipboard.
Clear on the Edit menu is the same as pressing the clear button.
2.10 - THE LOG
The log window displays two columns. On the left it shows the value of x and on the right it shows the operation or function that produced it. The log is updated when it is open, but inactive when closed. Entries are added to it as operations are actually evaluated. This is often some time after the operation has been entered because the calculator is having to look ahead to the following operation in order to get precedence right.
Opening
The log is opened from the File menu. You can also set it to open automatically whenever you launch the calculator using the check box in the preferences dialog.
Clearing
The log can be cleared by selecting Clear Log from the Edit menu. This cannot be undone so save the log first if you need it.
Saving
Select Save Log from the File menu. The log is saved as a SimpleText document with the two columns separated by spaces. You can choose to have tabs instead of spaces (though SimpleText doesn’t understand tabs). Select this option from the preferences dialog.
Closing
Close from the File menu or by clicking the window's close box. If the log is not empty, and hasn't been saved, you will be prompted to save it.
There is a limit of 800 lines in the log. You will get a warning that you need to clear it before you reach this limit (at 790 lines). In practice it is wise to save the log before it gets this big.
You can use the keyboard to drive the calculator even when the log window is in front.
2.11 - CONVERSIONS
Most of the conversions are worked out from first principle and are exact (to the limit of displayed digits). For example, the inch is defined internationally to be exactly 25.4mm. Where approximations are used they are to at least 8 significant digits. Approximate conversions are indicated by italics.
Angles
Conversions between radians and degrees work at any time, the Numbers menu only affects trig functions as they are used.
Distance
• Miles are statute miles, equal to 5280 feet.
• Nautical miles are international standard nautical miles (1852 metres).
• A fathom is an (old) unit of depth, equal to six feet.
• Points are set in the preferences dialog. A pica is 12 points.
• The astronomical units are all approximations. There is some ambiguity about what a light year is, here it is the distance travelled by light in one sidereal year (365.2526 days).
Mass
• Units like the ounce are both imperial and US.
• A tonne is 1000 kg, or a ‘megagramme’.
• UK cwt and tons are also known as ‘long’ (1 cwt = 112 lb).
• US cwt and tons are also known as ‘short’ (1 cwt = 100 lb).
Time
• …
Area
• Hectares are rather trivial to convert but are the standard measure of land, 1 hectare = 100 ares, or 1/100th of a sq km.
Volume
• The SI unit is the cubic metre, but the more practical litre is used here, 1 cu metre = 1000 litres, or 1 litre = 1 cu decimetre.
• There are two varieties of US measure; dry and liquid (wet). The liquid measures are the most common.
• A barrel of oil is an international unit, but is under ‘US’ because it happens to be exactly 42 US wet gallons.
Speed
• Knots are nautical miles per hour (see distance).
Force
• 1 kgF is the force exerted by 1 kilogramme under 1 Standard Earth Gravity.
• 1 Standard Earth Gravity is defined to be 9.80665 [m/s2] exactly.
Pressure
• The basic unit is the Pascal which equals 1 newton per sq metre. This is a very small pressure, kiloPascals [kPa] and even megaPascals [MPa] are more common.
Temperature
• Temperatures below absolute zero (0K) are treated as potential errors.
Recommended web sites for information on units and conversions:
A Dictionary of Units
Concise, comprehensive and accurate data
<http://www.ex.ac.uk/cimt/dictunit/dictunit.htm>
How Many?
Detailed history and background information
<http://www.unc.edu/~rowlett/units/index.html>
NOTES
________________
3.1 - PREFERENCES
On Startup... Open Log makes a new log open automatically when the program starts.
Save log with... either spaces or tabs. Use spaces unless you want to open the log in a word processor to format it. Note: log files saved with tabs are smaller that those saved with spaces.
Points affects conversions. For general typographic work with applications such as Photoshop or Pagemaker use DTP points (72 per inch exactly). Didot and traditional points are very rare nowadays.
Scheme to match your iMac ...?
Sounds can be loud, soft or off. Loud is slightly less than the general volume level set in the Sound control panel, soft is about half that.
3.2 - ACCURACY
Internally YaCa uses long doubles for its calculations. Because this is binary arithmetic and the display is decimal you may get the occasional - very small - error. This can be due to rounding but, most often, it is because some numbers cannot be represented in one base or the other perfectly (for example 1/3 in decimal).
3.3 - SYSTEM REQUIREMENTS
System 7.0 or later.
At least a 68020 processor.
150k of free ram.
3.4 - TECHNICAL NOTES
YaCa is written in C and compiled using MPW and SC to produce 68k code. So it should run on just about everything. A pure PowerPC version is for the future.
YaCa understands the four required AppleEvents, but only responds to ‘Quit’ (issued when the system closes down).